﻿<%@ page language="java" pageEncoding="UTF-8"%>  
<!DOCTYPE html>
<html>
<head>
<title>信息管理系统_用户登录</title>

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/login.css" />
</head>
<body>

<form action="/system/login" method="post" id="sys_form">
<div id="login">
	<p>登录帐号：<input type="text"  id="manager" class="textbox" name="username"></p>
	<p>登录密码：<input type="password" id="password" class="textbox" name="password"></p>
	<p style="display:block;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;身份：
		<select name="identify" id="identify">
			<option value="admin">超级管理员</option>
			<option value="departAdmin">部门管理员</option>
			<option value="ssAdmin">实施人员</option>
			<option value="kfAdmin">客服人员</option>
		</select>
	</p>
	<p> <font color="#999">记住账号</font>
		<input  id="saveid" type="checkbox"  onclick="savePaw();" name="remember" />
	</p>
	 
</div>

<div id="btn">
	<input type="button" value="登录" class="easyui-linkbutton" id="btn_login">
<%--	<a href="#" class="easyui-linkbutton" id="btn_login">登录</a>--%>
</div>
</form>
<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/locale/easyui-lang-zh_CN.js" ></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.cookie.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/login.js"></script>
<script type="text/javascript">
	$("#btn_login").click(function(){
		var username = $("#manager").val();
		var password = $("#password").val();
		var remember = $("#saveid").val();
		$.ajax({
			url : "/system/login",
			type : "post",
			contentType : "application/json",
			dataType : "json",
			data : '{"username":"'+username+'","password":"'+ password + '","remember":"'+remember+'"}',
			success : function(data){
				// var message = $.parseJSON(data)
				console.log(data.success);
				if(data.success){
					window.location.href = "/system/manager?username=" + username;
				}
			}
		});
	});
</script>
</body>
</html>
</html>
